# a = open('a.txt', 'r', encoding='utf-8')
# aTxt = a.read()  # 拿到a文件的内容
# a.close()
# with open() as 变量名：  使用它就不需要再考虑close了
#
with open('a.txt', 'r', encoding='utf-8') as file:
    t = file.read()
    print(t)
